package java学习.第11章_常用类和基础API;

import java.security.SecureRandom;
import java.util.Random;

/**
 * ClassName: K_随机数
 * Package: java学习.第11章_常用类和基础API
 * Description:
 *
 * @Author 张蛟龙
 * @Create 2023/3/26 19:49
 * @Version 1.0
 */
public class K_随机数 {
    public static void main(String[] args) {
        随机数();
    }

    private static void 随机数() {
        SecureRandom secureRandom = new SecureRandom();
        Random random = new Random();
        System.out.println(secureRandom.nextInt());
        System.out.println(random.nextInt(10));//[0,10)
    }
}
